package chapter08;

/**
 * Created by V5470-I5 on 2016/3/31.
 */
/*
import static java.lang.System.out;
public class AutoClosableDemo2 {
    public static void main (String[] args){
        try(ResourceSome some = new Resource();
        ResourceOther other =new ResourceOther()){
            some.doSome();
            other.doOther();
        }catch (Exception ex){
            ex.printStackTrace();
        }
    }
}
class ResourceSome implements  AutoCloseable{
    void doSome(){
        out.println("做一些事情");
    }
    @Override
    public void close() throws Exception{
        out.println("资源Some被关闭");
    }
}
class ResourceOther implements AutoCloseable{
    void doOther(){
        out.println("做其他事");
    }
    @Override
    public void close() throws Exception{
        out.println("资源Other被关闭");
    }
}
*/